package org.zezs.sync.mongo.config.sync.metadata;

import com.alibaba.fastjson.annotation.JSONField;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

public class Rules {

    @JSONField(serialize = false)
    private Chains ref_chains;
    //过滤规则唯一标记，无太大意义，做标记用处
    private String id;
    //假如数据源数据中已经过滤出来的数据一部分已经处理了，新加的数据规则可以单独定制，用这个可以处理新数据，当数据补全后这个规则可以删掉
    private List<Where> where = new ArrayList<>();
    //与where对应
    private List<Where> destWhere = new ArrayList<>();


    //为fase时候无效
    private boolean use = true;

    //同步逻辑字段不需要理解
    private String min;
    //同步逻辑字段不需要理解
    private Map<String, Object> minRow;
    //同步逻辑字段不需要理解
    private String minCollection;
    //同步逻辑字段不需要理解
    @JSONField(serialize = false)
    private boolean wait = false;

    public void setWhere(List<Where> where) {
        this.where = where;
    }

    public List<Where> getWhere() {
        return where;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }


    public Chains getRef_chains() {
        return ref_chains;
    }

    public void setRef_chains(Chains ref_chains) {
        this.ref_chains = ref_chains;
    }

    public boolean isWait() {
        return wait;
    }

    public void setWait(boolean wait) {
        this.wait = wait;
    }


    public boolean isUse() {
        return use;
    }

    public void setUse(boolean use) {
        this.use = use;
    }


    public List<Where> getDestWhere() {
        return destWhere;
    }

    public void setDestWhere(List<Where> destWhere) {
        this.destWhere = destWhere;
    }

    public String getMin() {
        return min;
    }

    public void setMin(String min) {
        this.min = min;
    }

    public Map<String, Object> getMinRow() {
        return minRow;
    }

    public void setMinRow(Map<String, Object> minRow) {
        this.minRow = minRow;
    }

    public String getMinCollection() {
        return minCollection;
    }

    public void setMinCollection(String minCollection) {
        this.minCollection = minCollection;
    }
}